<template>
  <el-dialog
    :title="!Id ? '新增材料组' : '修改材料组'"
    :close-on-click-modal="false"
    width="30%"
    :visible.sync="visible"
  >
    <MategroupView ref="view" @close="close" />
  </el-dialog>
</template>
<script>
import MategroupView from './MategroupView'
export default {
  components: {
    MategroupView
  },
  data() {
    return {
      visible: false,
      Id: ''
    }
  },
  methods: {
    init(id, parentId, tenant) {
      this.Id = id
      this.visible = true
      this.$nextTick(() => {
        debugger
        this.$refs.view.init(id, parentId, tenant)
      })
    },
    close() {
      this.visible = false
      this.$emit('refreshDataList')
    }

  }
}
</script>
